From: Fabio Erculiani Date: Mon, 9 Feb 2026 14:31:47 +0000 (+0100) Subject: status: Include deployment origin refspec as refspec in JSON output X-Git-Tag: archive/raspbian/2026.2-1+rpi1~1^2~10^2^2~9^2 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=67774c4f7327c95d81e1861a95507dcb8c86b327;p=ostree.git status: Include deployment origin refspec as refspec in JSON output --- diff --git a/src/ostree/ot-admin-builtin-status.c b/src/ostree/ot-admin-builtin-status.c index 459f28f0..8c5b7e2f 100644 --- a/src/ostree/ot-admin-builtin-status.c +++ b/src/ostree/ot-admin-builtin-status.c @@ -197,11 +197,16 @@ deployment_write_json (OstreeSysroot *sysroot, OstreeRepo *repo, OstreeDeploymen gboolean is_booted, gboolean is_pending, gboolean is_rollback, struct ul_jsonwrt *jo, GCancellable *cancellable, GError **error) { + GKeyFile *origin = ostree_deployment_get_origin (deployment); + g_autofree char *origin_refspec + = origin ? g_key_file_get_string (origin, "origin", "refspec", NULL) : NULL; + ul_jsonwrt_object_open (jo, NULL); const char *ref = ostree_deployment_get_csum (deployment); ul_jsonwrt_value_s (jo, "checksum", ref); ul_jsonwrt_value_s (jo, "stateroot", ostree_deployment_get_osname (deployment)); + ul_jsonwrt_value_s (jo, "refspec", origin_refspec); ul_jsonwrt_value_u64 (jo, "serial", ostree_deployment_get_deployserial (deployment)); ul_jsonwrt_value_u64 (jo, "index", ostree_deployment_get_index (deployment)); ul_jsonwrt_value_boolean (jo, "booted", is_booted);